﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ZenSystemService.Api.Migrations
{
    /// <inheritdoc />
    public partial class SalesOrderId : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_InstitutionSalesOrders_Institutions_InstitutionId",
                table: "InstitutionSalesOrders");

            migrationBuilder.DropIndex(
                name: "IX_InstitutionSalesOrders_InstitutionId",
                table: "InstitutionSalesOrders");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateIndex(
                name: "IX_InstitutionSalesOrders_InstitutionId",
                table: "InstitutionSalesOrders",
                column: "InstitutionId");

            migrationBuilder.AddForeignKey(
                name: "FK_InstitutionSalesOrders_Institutions_InstitutionId",
                table: "InstitutionSalesOrders",
                column: "InstitutionId",
                principalTable: "Institutions",
                principalColumn: "InstitutionId",
                onDelete: ReferentialAction.Cascade);
        }
    }
}
